package com.mdlib.helper.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;

import com.ljlib.help.R;

/**
 * Created by librabin on 16/12/17.
 */

public class TitleBar extends FrameLayout {

    private ImageView mImgLeft;
    private TextView mTxtCenter;
    private TextView mTxtRight;


    public TitleBar(Context context) {
        super(context);
        init(null, 0, 0);
    }

    public TitleBar(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(attrs, 0, 0);
    }

    public TitleBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(attrs, defStyleAttr, 0);
    }



    private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        Context context = getContext();

        LayoutInflater inflater = LayoutInflater.from(context);
        inflater.inflate(R.layout.base_title_bar, this, true);

        mImgLeft = (ImageView) findViewById(R.id.iv_title_left);
        mTxtCenter = (TextView) findViewById(R.id.tv_title_center);
        mTxtRight = (TextView) findViewById(R.id.tv_title_right);


    }










}
